home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / FALCON / ACC / DRIVERS.ACC / BUTOR.S next >
Encoding:
Text File  |  2001-02-10  |  757 b   |  38 lines

  1.  
  2.         .globl    BUT_OR, BADDR, BSTATE, BREAL
  3.  
  4.  
  5. *    The right and left buttons are ORed together as the Left button
  6. *    flag and passed to the AES mouse button interrupt routine. 
  7. *
  8. *  in:
  9. *    _BUT_ADDR contains the address of the AES interrupt routine
  10. *    that deals with mouse buttons.
  11. *
  12. * out:
  13. *    _BUT_STATE contains the actual mouse button state prior to ORing
  14.  
  15.         .text
  16.  
  17. BUT_OR:
  18.         and.w    #$FFFF,d0
  19.         tst     d0
  20.         move.w  d0,BREAL
  21.         beq    place
  22.           move.w    d0,BSTATE
  23.         move.w    #1,d0
  24.  
  25. place:
  26. ;        move.l    BADDR,-(sp)
  27.         rts                ; jmp to AES subroutine
  28. ; The move.l BADDR should be there, however, in the case of this
  29. ; CPX, it prevents a fall through to the AES.
  30.  
  31.                 .bss
  32.  
  33.         .even
  34.  
  35. BADDR:        .ds.l    1
  36. BSTATE:        .ds.w    1
  37. BREAL:        .ds.w    1
  38.